package com.test.study.loadblance;

import java.util.List;
import java.util.Random;

/**
 * @ClassName RandomLoadBlance
 * @Description TODO
 * @Author USER
 * @Date 2019/7/12 16:11
 * @Company
 **/
public class RandomLoadBlance extends AbstractLoadBlance {
    @Override
    String doSelectService(List<String> services) {
        Random random = new Random(services.size());
        return services.get(random.nextInt());
    }

}
